package com.aizuda.boot.modules.flw.entity;

import com.aizuda.core.bean.BaseEntity;
import com.aizuda.core.validation.Create;
import com.baomidou.mybatisplus.annotation.SqlCondition;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.PositiveOrZero;
import jakarta.validation.constraints.Size;
import lombok.Getter;
import lombok.Setter;

/**
 * 流程表单分类
 *
 * @author hubin
 * @since 2024-05-19
 */
@Getter
@Setter
@Schema(name = "FlwFormCategory", description = "流程表单分类")
@TableName("flw_form_category")
public class FlwFormCategory extends BaseEntity {

	@Schema(description = "租户ID")
	@Size(max = 64)
	private String tenantId;

	@Schema(description = "父ID")
	@NotNull(groups = Create.class)
	@PositiveOrZero
	private Long pid;

	@Schema(description = "名称")
	@NotBlank(groups = Create.class)
	@Size(max = 50)
	@TableField(condition = SqlCondition.LIKE)
	private String name;

	@Schema(description = "备注")
	@Size(max = 255)
	private String remark;

	@Schema(description = "状态 0、禁用 1、正常")
	@NotNull(groups = Create.class)
	@PositiveOrZero
	private Short status;

	@Schema(description = "排序")
	@NotNull(groups = Create.class)
	@PositiveOrZero
	private Short sort;

}
